using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Petra.Gis.Geometry;
using Petra.Gis.Geometry.Support;
using Petra.Gis.DataServices.MSSQL10.Support;

namespace Petra.Gis.DataServices.MSSQL10
{



  public partial class GeometryFactory
  {


    private static GeometryBase binaryToLongTopoGeometry(BinaryReader mBReader, System.Type parentGeomType)
    {
      //skip SRID
      mBReader.BaseStream.Position += 4;

      //read coordlist type
      //SqlSvrCoordListTypeEnum cListType = (SqlSvrCoordListTypeEnum)mBReader.ReadInt16();
      //skip coordlist type
      mBReader.BaseStream.Position += 2;

      //read coordlist...
      int numPoints = mBReader.ReadInt32();
      CoordinateList Coords = new CoordinateList(((SqlSvrMemoryStream)mBReader.BaseStream).GetBuffer(), (int)mBReader.BaseStream.Position, numPoints, Dimension.dim2D);

      //read num of figures..
      int numFigures = mBReader.ReadInt32();


      //recognize geom type...



      throw new NotImplementedException();
    }




    private static GeometryBase binaryToShortTopoGeometry(BinaryReader mBReader, System.Type parentGeomType)
    {
      throw new NotImplementedException();
    }


  }
}
